import {
  axios
} from '@/utils/request'
/**
       * 事项-我的审核api
    */

// 待办审核列表查询
function getMyPendingAudit (data) {
  return axios({
    url: '/workflow-manage/myaudit/dealing',
    method: 'get',
    params: data
  })
}
// 已办审核列表查询
function getMyDealedAudit (data) {
  return axios({
    url: '/workflow-manage/myaudit/dealed',
    method: 'get',
    params: data
  })
}
// 已撤销审核列表查询
function getMyCanceledAudit (data) {
  return axios({
    url: '/workflow-manage/myaudit/cancel',
    method: 'get',
    params: data
  })
}
// 通过审核
function passThisAudit (data) {
  return axios({
    url: '/workflow-manage/myaudit/pass',
    method: 'put',
    data
  })
}
// 驳回审核
function rejectThisAudit (data) {
  return axios({
    url: '/workflow-manage/myaudit/reject',
    method: 'put',
    data
  })
}
// 添加审核测试信息
function addTestInfoDetail (data) {
  return axios({
    url: '/sw-repository/apply/addTestInfo',
    method: 'put',
    data
  })
}
// 获取审核流程详情
function getReviewFlowDetail (data) {
  return axios({
    url: '/workflow-manage/instance/detail',
    method: 'get',
    params: data
  })
}
// 获取任务审核详情
function getTaskReviewDetail (data) {
  return axios({
    url: '/workflow-manage/myaudit/task/'+ data.id,
    method: 'get'
  })
}
export default {
  getMyPendingAudit, getMyDealedAudit, getMyCanceledAudit, getReviewFlowDetail, passThisAudit, rejectThisAudit,addTestInfoDetail,getTaskReviewDetail
}
